package com.ehotting.edsta.diagnosisPredict.feign;

import com.ehotting.eaf.core.web.domain.diagnosisPredict.Response;
import com.ehotting.edsta.diagnosisPredict.domain.dto.FeDatafield;
import com.ehotting.edsta.diagnosisPredict.domain.dto.FeDatafile;
import com.ehotting.edsta.diagnosisPredict.feign.factory.FeDatafileFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * 特征工程原始数据文件FeignClient
 */
@FeignClient(name = "feDatafile", url = "${request.url.prefix}/feDatafile",fallbackFactory = FeDatafileFallbackFactory.class)
public interface FeDatafileFeignService {
    /**
     * 特征工程原始数据文件字段列表
     * @return
     */
    @PostMapping(value = "/uploadAnalyze")
    Response<List<FeDatafield>> uploadAnalyze(@RequestParam("equipentityId") Long equipentityId,
                                              @RequestParam("file") MultipartFile file,
                                              @RequestParam("fileDesc") String fileDesc,
                                              @RequestParam("iteminfoId") Long iteminfoId,
                                              @RequestParam("itemname") String itemname,
                                              @RequestParam("processingId") Long processingId,
                                              @RequestParam("txtMethod") Integer txtMethod);

    /**
     * 特征工程原始数据文件字段列表
     * @return
     */
    @PostMapping(value = "/analyzeSave")
    Response<FeDatafile> analyzeSave(@RequestParam("id") Long id);

}
